package cn.wubo.dynamic.schedule.controller;

import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class PageController {

    /**
     * 获取请求路径并返回列表页面
     *
     * @param request HTTP请求对象
     * @return ModelAndView对象，包含视图名称和模型数据对象
     */
    @GetMapping(value = "list")
    public ModelAndView list(HttpServletRequest request) {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("contextPath", request.getContextPath());
        modelAndView.setViewName("list");
        return modelAndView;
    }

}
